# -*- coding: utf-8 -*-

"""
@author: Laowang
@contact: QQ:1125564921
@Created on: 2022/6/27
@Remark: 
"""
from typing import List
from prettytable import PrettyTable


def pretty_table(columns: List, row: List, *, title: str = None, **kwargs):
    """ 
    Print the form to the terminal

    Parameters
    ----------
    columns : The column name of the table, of type List,
    row : The contents of the table column are of type List
    title: table title, default None
    
    Example
    ---------
    table = PrettyTable(["TestPoints", "Units"])
    table.add_row([(XX, XX])
    print(table)
    """

    table = PrettyTable(columns, title=title)
    table.add_row(row)
    print(table)
